home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 24 / CU Amiga Magazine's Super CD-ROM 24 (1998)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1998-07].iso / CUCD / Utilities / vim-5.1 / src / option.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-27  |  13.4 KB  |  339 lines

  1. /* vi:set ts=8 sts=4 sw=4:
  2.  *
  3.  * VIM - Vi IMproved    by Bram Moolenaar
  4.  *
  5.  * Do ":help uganda"  in Vim to read copying and usage conditions.
  6.  * Do ":help credits" in Vim to see a list of people who contributed.
  7.  */
  8.  
  9. /*
  10.  * option.h: definition of global variables for settable options
  11.  *
  12.  * EXTERN is only defined in main.c (and vim.h)
  13.  */
  14.  
  15. #ifndef EXTERN
  16. # define EXTERN extern
  17. # define INIT(x)
  18. #else
  19. # ifndef INIT
  20. #  define INIT(x) x
  21. # endif
  22. #endif
  23.  
  24. /* default values for p_efm 'errorformat' */
  25. #ifdef AMIGA
  26.             /* don't use [^0-9] here, Manx C can't handle it */
  27. # define EFM_DFLT    "%f>%l:%c:%t:%n:%m,%f:%l: %t%*[^0123456789]%n: %m,%f %l %t%*[^0123456789]%n: %m,%*[^\"]\"%f\"%*[^0123456789]%l: %m,%f:%l:%m"
  28. #else
  29. # if defined MSDOS  ||    defined WIN32
  30. #  define EFM_DFLT    "%f(%l) : %t%*[^0-9]%n: %m,%*[^\"]\"%f\"%*[^0-9]%l: %m,%f(%l) : %m,%*[^ ] %f %l: %m,%f:%l:%m"
  31. # else
  32. #  if defined(__EMX__)    /* put most common here (i.e. gcc format) at front */
  33. #   define EFM_DFLT    "%f:%l:%m,%*[^\"]\"%f\"%*[^0-9]%l: %m,\"%f\"%*[^0-9]%l: %m,%f(%l:%c) : %m"
  34. #  else
  35. #   if defined(__QNX__)
  36. #    define EFM_DFLT    "%f(%l):%*[^WE]%t%*[^0123456789]%n:%m"
  37. #   else /* Unix, probably */
  38. #    define EFM_DFLT    "%*[^\"]\"%f\"%*[^0-9]%l: %m,\"%f\"%*[^0-9]%l: %m,%f:%l:%m,\"%f\"\\, line %l%*[^0-9]%c%*[^ ] %m"
  39. #   endif
  40. #  endif
  41. # endif
  42. #endif
  43.  
  44. /* default values for b_p_ff 'fileformat' and p_ffs 'fileformats' */
  45. #define FF_DOS        "dos"
  46. #define FF_MAC        "mac"
  47. #define FF_UNIX        "unix"
  48.  
  49. #ifdef USE_CRNL
  50. # define FF_DFLT    "dos"
  51. # define FFS_DFLT    "dos,unix"
  52. # define FFS_VI        "dos,unix"    /* also autodetect in compatible mode */
  53. # define TA_DFLT    TRUE
  54. #else
  55. # ifdef USE_CR
  56. #  define FF_DFLT    "mac"
  57. #  define FFS_DFLT    "mac,unix,dos"
  58. # else
  59. #  define FF_DFLT    "unix"
  60. #  define FFS_DFLT    "unix,dos"
  61. # endif
  62. # define FFS_VI        ""
  63. # define TA_DFLT    FALSE
  64. #endif
  65.  
  66. /* end-of-line style */
  67. #define EOL_UNKNOWN    -1    /* not defined yet */
  68. #define EOL_UNIX    0    /* NL */
  69. #define EOL_DOS        1    /* CR NL */
  70. #define EOL_MAC        2    /* CR */
  71.  
  72. /* Formatting options for p_fo 'formatoptions' */
  73. #define FO_WRAP        't'
  74. #define FO_WRAP_COMS    'c'
  75. #define FO_RET_COMS    'r'
  76. #define FO_OPEN_COMS    'o'
  77. #define FO_Q_COMS    'q'
  78. #define FO_Q_SECOND    '2'
  79. #define FO_INS_VI    'v'
  80. #define FO_INS_LONG    'l'
  81. #define FO_INS_BLANK    'b'
  82.  
  83. #define FO_DFLT_VI    "vt"
  84. #define FO_DFLT        "tcq"
  85. #define FO_ALL        "tcroq2vlb,"    /* for do_set() */
  86.  
  87. /* characters for the p_cpo option: */
  88. #define CPO_ALTREAD    'a'    /* ":read" sets alternate file name */
  89. #define CPO_ALTWRITE    'A'    /* ":write" sets alternate file name */
  90. #define CPO_BAR        'b'    /* "\|" ends a mapping */
  91. #define CPO_BSLASH    'B'    /* backslash in mapping is not special */
  92. #define CPO_SEARCH    'c'
  93. #define CPO_DOTTAG    'd'    /* "./tags" in 'tags' is in current dir */
  94. #define CPO_EXECBUF    'e'
  95. #define CPO_EMPTYREGION    'E'    /* operating on empty region is an error */
  96. #define CPO_FNAMER    'f'    /* set file name for ":r file" */
  97. #define CPO_FNAMEW    'F'    /* set file name for ":w file" */
  98. #define CPO_JOINSP    'j'    /* only use two spaces for join after '.' */
  99. #define CPO_KEYCODE    'k'    /* don't recognize raw key code in mappings */
  100. #define CPO_LITERAL    'l'    /* take char after backslash in [] literal */
  101. #define CPO_LISTWM    'L'    /* 'list' changes wrapmargin */
  102. #define CPO_SHOWMATCH    'm'
  103. #define CPO_LINEOFF    'o'
  104. #define CPO_REDO    'r'
  105. #define CPO_BUFOPT    's'
  106. #define CPO_BUFOPTGLOB    'S'
  107. #define CPO_TAGPAT    't'
  108. #define CPO_UNDO    'u'    /* "u" undoes itself */
  109. #define CPO_CW        'w'    /* "cw" only changes one blank */
  110. #define CPO_FWRITE    'W'    /* "w!" doesn't overwrite readonly files */
  111. #define CPO_ESC        'x'
  112. #define CPO_YANK    'y'
  113. #define CPO_DOLLAR    '$'
  114. #define CPO_FILTER    '!'
  115. #define CPO_MATCH    '%'
  116. #define CPO_SPECI    '<'    /* don't recognize <> in mappings */
  117. #define CPO_DEFAULT    "aABceFs"
  118. #define CPO_ALL        "aAbBcdeEfFjklLmorsStuwWxy$!%<"
  119.  
  120. /* characters for p_ww option: */
  121. #define WW_ALL        "bshl<>[],"
  122.  
  123. /* characters for p_mouse option: */
  124. #define MOUSE_NORMAL    'n'        /* use mouse in normal mode */
  125. #define MOUSE_NORMAL_NV    'N'        /* idem, but no Visual mode */
  126. #define MOUSE_VISUAL    'v'        /* use mouse in visual mode */
  127. #define MOUSE_INSERT    'i'        /* use mouse in insert mode */
  128. #define MOUSE_INSERT_NV    'I'        /* idem, but no Visual mode */
  129. #define MOUSE_COMMAND    'c'        /* use mouse in command line mode */
  130. #define MOUSE_HELP    'h'        /* use mouse in help buffers */
  131. #define MOUSE_RETURN    'r'        /* use mouse for hit-return message */
  132. #define MOUSE_A        "nvichVCH"    /* used for 'a' flag */
  133. #define MOUSE_A_NV    "NvIchVCH"    /* used for 'A' flag */
  134. #define MOUSE_ALL    "aAnNviIcrh"    /* all possible characters */
  135.  
  136. /* characters for p_shm option: */
  137. #define SHM_RO        'r'        /* readonly */
  138. #define SHM_MOD        'm'        /* modified */
  139. #define SHM_FILE    'f'        /* (file 1 of 2) */
  140. #define SHM_LAST    'i'        /* last line incomplete */
  141. #define SHM_TEXT    'x'        /* tx instead of textmode */
  142. #define SHM_LINES    'l'        /* "L" instead of "lines" */
  143. #define SHM_NEW        'n'        /* "[New]" instead of "[New file]" */
  144. #define SHM_WRI        'w'        /* "[w]" instead of "written" */
  145. #define SHM_A        "rmfixlnw"    /* represented by 'a' flag */
  146. #define SHM_WRITE    'W'        /* don't use "written" at all */
  147. #define SHM_TRUNC    't'        /* trunctate message */
  148. #define SHM_OVER    'o'        /* overwrite file messages */
  149. #define SHM_SEARCH    's'        /* no search hit bottom messages */
  150. #define SHM_ATTENTION    'A'        /* no ATTENTION messages */
  151. #define SHM_INTRO    'I'        /* intro messages */
  152. #define SHM_ALL        "rmfixlnwaWtosAI" /* all possible flags for 'shm' */
  153.  
  154. /* characters for p_guioptions: */
  155. #define GO_ASEL        'a'        /* autoselect */
  156. #define GO_BOT        'b'        /* GUI: use bottom scrollbar */
  157. #define GO_FORG        'f'        /* GUI: start GUI in foreground */
  158. #define GO_GREY        'g'        /* GUI: use grey menu items */
  159. #define GO_LEFT        'l'        /* GUI: use left scrollbar */
  160. #define GO_MENUS    'm'        /* GUI: use menu bar */
  161. #define GO_RIGHT    'r'        /* GUI: use right scrollbar */
  162. #define GO_ALL        "abfglmr"    /* all possible flags for 'go' */
  163.  
  164. /* flags for 'comments' option */
  165. #define COM_NEST    'n'        /* comments strings nest */
  166. #define COM_BLANK    'b'        /* needs blank after string */
  167. #define COM_START    's'        /* start of comment */
  168. #define COM_MIDDLE    'm'        /* middle of comment */
  169. #define COM_END        'e'        /* end of comment */
  170. #define COM_FIRST    'f'        /* first line comment only */
  171. #define COM_LEFT    'l'        /* left adjusted */
  172. #define COM_RIGHT    'r'        /* right adjusted */
  173. #define COM_ALL        "nbsmeflr"    /* all flags for 'comments' option */
  174. #define COM_MAX_LEN    50        /* maximum length of a part */
  175.  
  176. /*
  177.  * The following are actual variabables for the options
  178.  */
  179.  
  180. #ifdef RIGHTLEFT
  181. EXTERN int    p_aleph;    /* Hebrew 'Aleph' encoding */
  182. #endif
  183. EXTERN int    p_aw;        /* auto-write */
  184. EXTERN long    p_bs;        /* backspace over newlines in insert mode */
  185. EXTERN char_u  *p_bg;        /* window background color: light or dark */
  186. EXTERN int    p_bk;        /* make backups when writing out files */
  187. EXTERN char_u  *p_bdir;        /* list of directory names for backup files */
  188. EXTERN char_u  *p_bex;        /* extension for backup file */
  189. #ifdef MSDOS
  190. EXTERN int    p_biosk;    /* Use bioskey() instead of kbhit() */
  191. #endif
  192. EXTERN char_u  *p_breakat;    /* characters that can cause a line break */
  193. EXTERN long    p_ch;        /* command line height */
  194. EXTERN int    p_cp;        /* vi-compatible */
  195. EXTERN char_u  *p_cpo;        /* vi-compatible option flags */
  196. EXTERN char_u  *p_def;        /* Pattern for recognising definitions */
  197. EXTERN char_u  *p_dict;        /* Dictionaries for ^P/^N */
  198. #ifdef DIGRAPHS
  199. EXTERN int    p_dg;        /* enable digraphs */
  200. #endif
  201. EXTERN char_u    *p_dir;        /* list of directories for swap file */
  202. EXTERN int    p_ed;        /* :s is ed compatible */
  203. EXTERN int    p_ea;        /* make windows equal height */
  204. EXTERN char_u    *p_ep;        /* program name for '=' command */
  205. EXTERN int    p_eb;        /* ring bell for errors */
  206. EXTERN char_u  *p_ef;        /* name of errorfile */
  207. EXTERN char_u  *p_efm;        /* error format */
  208. #ifdef AUTOCMD
  209. EXTERN char_u  *p_ei;        /* events ignored for autocommands */
  210. #endif
  211. EXTERN int    p_ek;        /* function keys with ESC in insert mode */
  212. EXTERN int    p_exrc;        /* read .exrc in current dir */
  213. EXTERN char_u  *p_ffs;        /* acceptable file formats */
  214. EXTERN char_u  *p_fp;        /* name of format program */
  215. EXTERN int    p_gd;        /* /g is default for :s */
  216. #ifdef USE_GUI
  217. EXTERN char_u  *p_guifont;    /* GUI font list */
  218. EXTERN int    p_guipty;    /* use pseudo pty for external commands */
  219. EXTERN char_u  *p_guicursor;    /* shape settings for cursor */
  220. #endif
  221. #if defined(USE_GUI) || defined(USE_CLIPBOARD)
  222. EXTERN char_u  *p_guioptions;    /* Which GUI components? */
  223. #endif
  224. EXTERN char_u  *p_hf;        /* name of help file */
  225. EXTERN long    p_hh;        /* help window height */
  226. EXTERN int    p_hid;        /* buffers can be hidden */
  227. EXTERN char_u  *p_hl;        /* which highlight mode to use */
  228. EXTERN int    p_hls;        /* highlight matches with last search pattern */
  229. EXTERN long    p_hi;        /* command line history size */
  230. #ifdef RIGHTLEFT
  231. EXTERN int    p_hkmap;    /* Hebrew keyboard map */
  232. EXTERN int    p_hkmapp;    /* idem, phonetic */
  233. # ifdef FKMAP
  234. EXTERN int    p_fkmap;    /* Farsi keyboard map */
  235. EXTERN int    p_altkeymap;    /* alternative keyboard map Hebrew/Farsi */
  236. # endif
  237. #endif
  238. EXTERN int    p_icon;        /* put file name in icon if possible */
  239. EXTERN char_u  *p_iconstring;    /* icon string */
  240. EXTERN int    p_ic;        /* ignore case in searches */
  241. EXTERN int    p_is;        /* incremental search */
  242. EXTERN int    p_im;        /* start editing in input mode */
  243. EXTERN char_u  *p_inc;        /* Pattern for including other files */
  244. EXTERN char_u  *p_isf;        /* characters in a file name */
  245. EXTERN char_u  *p_isi;        /* characters in an identifier */
  246. EXTERN char_u  *p_isp;        /* characters that are printable */
  247. EXTERN int    p_js;        /* use two spaces after '.' with Join */
  248. EXTERN char_u  *p_kp;        /* keyword program */
  249. #ifdef HAVE_LANGMAP
  250. EXTERN char_u  *p_langmap;    /* mapping for some language */
  251. #endif
  252. EXTERN long    p_ls;        /* last window has status line */
  253. EXTERN int    p_lz;        /* lazy redraw, only when key typed */
  254. EXTERN int    p_magic;    /* use some characters for reg exp */
  255. EXTERN char_u  *p_mef;        /* name of make errorfile */
  256. EXTERN char_u  *p_mp;        /* program for :make command */
  257. EXTERN long    p_mat;        /* time to show the match of a paren */
  258. EXTERN long    p_mmd;        /* maximal map depth */
  259. EXTERN long    p_mm;        /* maximal amount of memory for buffer */
  260. EXTERN long    p_mmt;        /* maximal amount of memory for Vim */
  261. EXTERN long    p_mls;        /* number of mode lines */
  262. EXTERN char_u  *p_mouse;    /* enable mouse clicks (for xterm) */
  263. #ifdef USE_GUI
  264. EXTERN int    p_mh;        /* hide pointer enable */
  265. #endif
  266. EXTERN long    p_mouset;    /* mouse double click time */
  267. EXTERN int    p_more;        /* wait when screen full when listing */
  268. EXTERN char_u  *p_para;        /* paragraphs */
  269. EXTERN int    p_paste;    /* paste mode */
  270. EXTERN char_u  *p_pm;        /* patchmode file suffix */
  271. EXTERN char_u  *p_path;        /* path for "]f" and "^Wf" */
  272. EXTERN int    p_remap;    /* remap */
  273. EXTERN long    p_report;    /* minimum number of lines for report */
  274. #ifdef WIN32
  275. EXTERN int    p_rs;        /* restore startup screen upon exit */
  276. #endif
  277. #ifdef RIGHTLEFT
  278. EXTERN int    p_ri;        /* reverse direction of insert */
  279. #endif
  280. EXTERN int    p_ru;        /* show column/line number */
  281. EXTERN long    p_sj;        /* scroll jump size */
  282. EXTERN long    p_so;        /* scroll offset */
  283. EXTERN char_u  *p_sections;    /* sections */
  284. EXTERN int    p_secure;    /* do .exrc and .vimrc in secure mode */
  285. EXTERN char_u  *p_sh;        /* name of shell to use */
  286. EXTERN char_u  *p_shcf;        /* flag to shell to execute one command */
  287. EXTERN char_u  *p_sp;        /* string for output of make */
  288. EXTERN char_u  *p_shq;        /* quote character(s) for shell */
  289. EXTERN char_u  *p_sxq;        /* quote around redirection for shell */
  290. EXTERN char_u  *p_srr;        /* string for output of filter */
  291. EXTERN long    p_st;        /* type of shell */
  292. EXTERN int    p_sr;        /* shift round off (for < and >) */
  293. EXTERN char_u  *p_shm;        /* When to use short message */
  294. EXTERN char_u  *p_sbr;        /* string for break of line */
  295. EXTERN int    p_sc;        /* show command in status line */
  296. EXTERN int    p_sm;        /* showmatch */
  297. EXTERN int    p_smd;        /* show mode */
  298. EXTERN long    p_ss;        /* sideways scrolling offset */
  299. EXTERN int    p_scs;        /* 'smartcase' */
  300. EXTERN int    p_sta;        /* smart-tab for expand-tab */
  301. EXTERN int    p_sb;        /* split window backwards */
  302. EXTERN int    p_sol;        /* Move cursor to start-of-line? */
  303. EXTERN char_u  *p_su;        /* suffixes for wildcard expansion */
  304. EXTERN char_u  *p_sws;        /* swap file syncing */
  305. EXTERN int    p_tbs;        /* tag binary search */
  306. EXTERN long    p_tl;        /* used tag length */
  307. EXTERN int    p_tr;        /* tag file name is relative */
  308. EXTERN char_u  *p_tags;        /* tags search path */
  309. EXTERN int    p_terse;    /* terse messages */
  310. EXTERN int    p_ta;        /* auto textmode detection */
  311. EXTERN int    p_to;        /* tilde is an operator */
  312. EXTERN int    p_timeout;    /* mappings entered within one second */
  313. EXTERN long    p_tm;        /* timeoutlen (msec) */
  314. EXTERN int    p_title;    /* set window title if possible */
  315. EXTERN long    p_titlelen;    /* length of window title in % of Columns */
  316. EXTERN char_u  *p_titlestring;    /* window title string */
  317. EXTERN int    p_ttimeout;    /* key codes entered within one second */
  318. EXTERN long    p_ttm;        /* key code timeoutlen (msec) */
  319. EXTERN int    p_tbi;        /* 'ttybuiltin' use builtin termcap first */
  320. EXTERN int    p_tf;        /* terminal fast I/O */
  321. EXTERN long    p_ttyscroll;    /* maximum nr of screen lines for a scroll */
  322. EXTERN long    p_ul;        /* number of Undo Levels */
  323. EXTERN long    p_uc;        /* update count for swap file */
  324. EXTERN long    p_ut;        /* update time for swap file */
  325. #ifdef VIMINFO
  326. EXTERN char_u  *p_viminfo;    /* Parameters for using ~/.viminfo file */
  327. #endif
  328. EXTERN int    p_vb;        /* visual bell only (no beep) */
  329. EXTERN long    p_verbose;    /* verbosity, -V command line argument */
  330. EXTERN int    p_warn;        /* warn for changes at shell command */
  331. EXTERN int    p_wiv;        /* inversion of text is weird */
  332. EXTERN char_u  *p_ww;        /* which keys wrap to next/prev line */
  333. EXTERN long    p_wc;        /* character for wildcard exapansion */
  334. EXTERN long    p_wh;        /* desired window height */
  335. EXTERN int    p_ws;        /* wrap scan */
  336. EXTERN int    p_wa;        /* write any */
  337. EXTERN int    p_wb;        /* write backup files */
  338. EXTERN long    p_wd;        /* write delay for screen output (for tests) */
  339.